<?php
/**
 * Code Controller
 *
 * Admin Core Generator
 *
 * @version $Id: CodeController.php 77 2010-04-25 07:28:48Z yingkuang.chen@gmail.com $
 * @license New BSD License
 * @uses Zend_Controller_Action
 * @package admin
 * @subpackage Controller
 */
class Admin_CodeController extends Zend_Controller_Action
{

    public function indexAction()
    {
        $foo      = new Zend_CodeGenerator_Php_Class();
        $docblock = new Zend_CodeGenerator_Php_Docblock(array(
    'shortDescription' => 'Sample generated class',
    'longDescription'  => 'This is a class generated with Zend_CodeGenerator.',
    'tags'             => array(
        array(
            'name'        => 'version',
            'description' => '$Rev: 77 $',
        ),
        array(
            'name'        => 'license',
            'description' => 'New BSD',
        ),
        ),
        ));
        $foo->setName('Foo')
        ->setDocblock($docblock)
        ->setProperties(array(
        array(
            'name'         => '_bar',
            'visibility'   => 'protected',
            'defaultValue' => 'baz',
        ),
        array(
            'name'         => 'baz',
            'visibility'   => 'public',
            'defaultValue' => 'bat',
        ),
        array(
            'name'         => 'bat',
            'const'        => true,
            'defaultValue' => 'foobarbazbat',
        ),
        ));
        $foo->generate();

    }

}